sudo mkdir -p /data/apps/process_exporter/conf
sudo sh -c "cat > /data/apps/process_exporter/conf/process_exporter.yml <<EOF
#监控所有进程
process_names:
  - name: \"{{.Comm}}\"
    cmdline:
    - '.+'
EOF
"

sudo docker rm -f process_exporter
sudo  docker run -d --restart=always  -p 9256:9256 --name process_exporter --privileged -v /proc:/host/proc -v /data/apps/process_exporter/conf:/config ncabatoff/process-exporter --procfs /host/proc -config.path /config/process_exporter.yml
sudo docker ps -a |grep exporter